
/*
 * @Description: Test03Collections
 * @Author: rendc
 * @Date: 2024-09-30 11:35:36
 * @LastEditors: rendc
 * @LastEditTime: 2024-09-30 14:36:13
 */
/**
 * Test03Collections
 */
import java.util.Collections;
import java.util.ArrayList;
import java.util.List;

import javafx.print.Collation;

public class Test03Collections {

  public static void main(String[] args) {
    List<Integer> list = new ArrayList<Integer>();
    list.add(3);
    list.add(2);
    list.add(1);
    list.add(4);
    System.out.println(list);
    // Collections.fill(list, 10);
    // System.out.println(list);
    System.out.println(Collections.max(list));
    System.out.println(Collections.min(list));
    Collections.sort(list);
    System.out.println(list);
    Collections.addAll(list, 1, 3, 5);
    System.out.println(list);
    Collections.addAll(list, 1);
    System.out.println(list);
    Collections.addAll(list);
    System.out.println(list);
  }
}